package org.maggioni.springsandbox.rehearsals.e04events.e01basic;

import org.maggioni.springsandbox.model.decorators.Showable;
import org.maggioni.springsandbox.model.draw.Point;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;

public class MyBean extends Showable implements ApplicationEventPublisherAware {
	
	private Point point;
	private ApplicationEventPublisher applicationEventPublisher;

	@Override
	public String toString() {
		applicationEventPublisher.publishEvent( new MyEvent(this) );
		return "MyBean [point=" + point + "]";
	}

	public Point getPoint() {
		return point;
	}

	public void setPoint(Point point) {
		this.point = point;
	}

	@Override
	public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
		this.applicationEventPublisher = applicationEventPublisher;
	}

	

}
